package Lijsten;

import java.util.ArrayList;

import model.Dier;
import model.Reptiel;
import model.Zoogdier;
import datalayer.ReptielLayer;
import datalayer.ZoogdierLayer;

public class ReptielLijst {
	
	private ReptielLayer zl = new ReptielLayer();
	ArrayList<Dier> dier = new ArrayList<Dier>();
	private static ReptielLijst instance;
	
	public static ReptielLijst getInstance(){
		if(instance == null){
			instance = new ReptielLijst();
		}
		return instance;
	}
	
	private ReptielLijst(){
		dier = new ArrayList<>();
	}
	
	public void addReptils(Reptiel d){
		dier.add(d);
	}

	public void loadReptils(){
		zl.openConn();
		zl.LoadAllReptils();
		zl.closeConn();
	}

	public ArrayList<Dier> getDier() {
		return dier;
	}

	public void setDier(ArrayList<Dier> dier) {
		this.dier = dier;
	}	

}
